package org.springblade.modules.admin.vo;

import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.springblade.modules.admin.enums.CompanyCategoryEnum;

import java.util.Date;

/**
 * @Date 14:34 2022/5/31
 * @Description {
 *   首页项目关联申请VO
 * }
 * @Author lsay
 **/
@Data
public class EstateApplicationFormHomePageVO {

	/**
	 * id
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	private String title;

	private String content;

	private String tenantId;

	private String tenantName;

	/**
	 * 租户分类
	 */
	private Integer sourceType;

	/**
	 * 租户分类
	 */
	private String companyCategoryName;

	private String applicationName;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	/**
	 * 通过数量
	 */
	private Integer pass;

	/**
	 * 总数
	 */
	private Integer total;

	public void setSourceType(Integer sourceType) {
		this.sourceType = sourceType;
		this.companyCategoryName = CompanyCategoryEnum.getName(sourceType);
	}

	public void setId(Long id) {
		this.title = "项目关联申请ID "+id;
		this.id = id;
	}

}
